import { Component, OnInit } from '@angular/core';

@Component({
    selector: 'app-ng-model',
    templateUrl: './ng-model.component.html',
    styleUrls: ['./ng-model.component.less']
})
export class NgModelComponent implements OnInit {

    msg = "";
    info ="info";
    radio = null;
    radioData = undefined;
    radioData1 = "";

    checkData1 = "";
    checkData2 = "";

    JSON =JSON;

    skills = {
        html:false,
        js:false,
        vue:false,
        angular:false,
    }

    selectData1 = "";

    fileSrc;
    constructor() { }

    print(e) {
        console.log(e);
    }

    getKeys(obj){
        return Object.keys(obj);
    }

    changeFile(e){
        // console.log(e);
        let fileData = e.target.files[0];
        // console.log(fileData);
        let reader = new FileReader();
        reader.readAsDataURL(fileData);
        reader.onload = ()=>{
            this.fileSrc = reader.result;
        }

    }

    ngOnInit() {
    }

}
